<?php

namespace App\Services;

use App\JsonRpc\AdminAuthInterface;
use Hyperf\RpcServer\Annotation\RpcService;

/**
 * @RpcService(name="AdminAuthService", protocol="jsonrpc", server="jsonrpc", publishTo="consul")
 */
class AdminAuthService implements AdminAuthInterface
{
    public function login(array $params)
    {
        //TODO 登录的逻辑
        return [
            "error_code" => 0 ,
            "error_msg" => "",
            "data" => [
                "token" => uniqid(),
                "params" => $params
            ]
        ];
    }
}